package org.infodavid.common.persistence;

import javax.persistence.PersistenceException;

import org.infodavid.common.persistence.impl.HibernatePersistenceProvider;
import org.infodavid.common.persistence.impl.builders.DefaultEntityManagerFactoryBuilder;

/**
 * The Class PersistenceProviderImpl.
 */
public class PersistenceProviderImpl extends HibernatePersistenceProvider {

	/**
	 * The Constructor.
	 *
	 * @throws Exception
	 *             the exception
	 */
	public PersistenceProviderImpl() throws Exception {
		super(new DefaultEntityManagerFactoryBuilder("PU"));
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see
	 * org.infodavid.common.persistence.impl.HibernatePersistenceProvider#open()
	 */
	@Override
	public PersistenceSession open() throws PersistenceException {
		return new PersistenceSessionWrapper(this, super.open());
	}
}
